package org.mozhu.zufang;

public interface Const {
	int SECONDS = 1000;
	int MINUTES = 60 * SECONDS;
	int HOURS = 60 * MINUTES;

	String DATE_TIME_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";
	String DATE_FORMAT_PATTERN = "yyyy-MM-dd";

	// for select2 plugins
	int DEFAULT_SELECT_PAGE_SIZE = 10;

	// 资源路径
	interface ResourcePath {
		String BASE_PATH = "static/";
		String IMAGE_AVATAR = "resource/image/avatar"; // 用户头像
	}

	interface Account {
		String HASH_ALGORITHM = "SHA-1";
		int HASH_INTERATIONS = 1024;
		int SALT_SIZE = 8;
	}

	interface SessionKey {
		String CAPTCHA = "simpleCaptcha";
	}

	interface CategoryType {
		String PERMISSION = "权限分类";
		String OTHER = "其它分类";
	}

	interface ResourceType {
		String MENU = "菜单";
	}

	String[] RESOURCE_TYPES = new String[] { ResourceType.MENU };

	interface Book {
		int STATUS_LOCK = -1; // 锁定 (个人借阅图书，先在网站上登记，登记后书会被锁定30分钟)
		int STATUS_OUT = 0; // 借出 (个人借书须申请，管理员审核后，书为借出状态)
		int STATUS_IN = 1; // 在库
	}

	interface BorrowRecord {
		int STATUS_APPLY = -1;// 申请中
		int STATUS_OUT = 1; // 借出
		int STATUS_BACK = 0;// 归还
	}

	interface BookApply {
		int STATUS_APPLY = -1; // 申请中
		int STATUS_PROCESSING = 0; // 处理中
		int STATUS_FINISH = 1; // 已购买
		int STATUS_REFUSED = 2;
	}

}
